package com.chengh.nami.common.domain.properties;

import lombok.Getter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author chengh
 * jwt相关配置信息类
 */
@Getter
@Component
@ConfigurationProperties(prefix = "nami.auth")
public class AuthProperties {

    /**
     * 密匙KEY
     */
    private String secret;

    /**
     * HeaderKEY
     */
    private String tokenHeader;

    /**
     * Token前缀字符
     */
    private String tokenPrefix;

    /**
     * 过期时间(分钟)
     */
    private Long expiration;

    /**
     * 不需要认证的接口
     */
    private String antMatchers;

    public void setSecret(String secret) {
        this.secret = secret;
    }

    public void setTokenHeader(String tokenHeader) {
        this.tokenHeader = tokenHeader;
    }

    public void setTokenPrefix(String tokenPrefix) {
        this.tokenPrefix = tokenPrefix;
    }

    public void setExpiration(Long expiration) {
        this.expiration = expiration;
    }

    public void setAntMatchers(String antMatchers) {
        this.antMatchers = antMatchers;
    }
}
